<?php
// Global $wp_query variable
global $wp_query;
// Set blank attributes
$catid = '';
$tagid = '';
$authorid = '';
$search = '';
// Posts Per Page
$attrs = 'data-postsperpage="'.get_option('posts_per_page').'"';
// Total Posts
$attrs .= ' data-numposts="'.$wp_query->found_posts.'"';
// Category
if(is_category())
	$attrs .= ' data-catid="'.get_query_var('cat').'"';
// Tag
if(is_tag())
	$attrs .= ' data-tagid="'.get_query_var('tag').'"';
// Author
if(is_author())
	$attrs .= ' data-authorid="'.get_query_var('author').'"';
// Author
if(is_search())
	$attrs .= ' data-search="'.get_query_var('search').'"';

function ieversion() {
  $match=preg_match('/MSIE ([0-9]\.[0-9])/',$_SERVER['HTTP_USER_AGENT'],$reg);
  if($match==0)
    return false;
  else
    return floatval($reg[1]);
}
$ie=(ieversion())?ieversion():10;
?>


<?php if(bandit::show_post_nav()): ?>	
	<?php if(bandit::get_option('theme_blog_ajaxnav') && ($ie > 8)): ?>
		<nav class="entry-nav clearfix">
			<p><a id="blog-load-more-link" <?php echo $attrs; ?> href="#"><?php bandit::lang('post_nav_ajax',__('Load More','creatic')); ?></a></p>
		</nav>
	<?php else: ?>
		<nav class="entry-nav clearfix">
			<ul class="clearfix">
				<li class="prev left"><?php previous_posts_link(bandit::get_lang('post_nav_prev',__('&larr; Previous','creatic'))); ?></li>
				<li class="next right"><?php next_posts_link(bandit::get_lang('post_nav_next',__('Next &rarr;','creatic'))); ?></li>
			</ul>
		</nav>
	<?php endif; ?>
<?php endif; ?>